package msu.ml.core.xml;

import msu.ml.core.*;
import msu.ml.data.*;
import msu.ml.classifiers.*;
import weka.classifiers.*;
import weka.classifiers.lazy.*;
import javax.xml.parsers.*;
import org.w3c.dom.*;

/**
 * @author Reginald M Mead
 * @version 1.0
 */
public class KNearestNeighborParser implements IClassifierParser
{
	public Classifier parse(Element element)
	{
		int k = Integer.parseInt(element.getAttribute("k"));

      IBk classifier = new IBk(k);

		if(ApplicationSettings.getInstance().getConfig("verbose").equals("true"))
      {
         System.out.println("K Nearest Neighbor Classifier");
			System.out.println("\tK = " + k);
		}

      return classifier;
   }
}
